/*
 *   Copyright (C) 2008 - 2009  FireBalls
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

//define
#ifndef __LEVEL__
#define __LEVEL__

// includes
#include <string>
#include <sstream>
#include <iostream>
#include "../render/Surface.h"
#include "../font/Font.h"
#include "../object/Enemy.h"
#include "../util/Global.h"
#include "../render/Surfaces.h"
#include "../io/Conf.h"
#include "../object/Player.h"
#include "../sound/Sound.h"
#include "../sound/Sounds.h"
#include "../object/Powerup.h"
#include "../font/Fonts.h"
using namespace std;

class Level {
    public:

        Level();
        ~Level();

        int Init(int i);

        void Loop();

        void Render(SDL_Surface *Surf_Window);

        void enemyType1();

        void enemyType2();

        void enemyType3();

        void enemyType4();

        bool getActive();

        void Powerup1();

        void Powerup2();

        void Powerup3();

        void Powerup4();

        void newPowerUp();

    private:

        //Powerup *powerup;

        Enemy enemy[100];

        Enemy missile[8];

        int Type1Speed, Type2Speed, Type3Speed, Type4Speed;

        int LevelNumber;

        string LevelFile;

        Conf Conf_Level;

        bool Type1Enabled, Type2Enabled, Type3Enabled, Type4Enabled;

        int ActiveEnemy, ActiveMissile;

        int Type3MinLength, Type3MaxLength;

        int Type1Points, Type2Points, Type3Points, Type4Points;

        int Type1MinDelay, Type1MaxDelay, Type2MinDelay, Type2MaxDelay, Type3MinDelay, Type3MaxDelay, Type4MinDelay, Type4MaxDelay;

        int Type1Delay, Type2Delay, Type3Delay, Type4Delay;


        bool Type1AllowNorth, Type1AllowEast, Type1AllowSouth, Type1AllowWest;

        bool Type2AllowNorth, Type2AllowEast, Type2AllowSouth, Type2AllowWest;

        bool Type3AllowNorth, Type3AllowEast, Type3AllowSouth, Type3AllowWest;

        bool Type4AllowNorth, Type4AllowEast, Type4AllowSouth, Type4AllowWest;

        bool Type1StartPlayerPosition, Type2StartPlayerPosition, Type3StartPlayerPosition, Type4StartPlayerPosition;



        int Points;

        int PointsToWin;

        bool active;

};

#endif
